Search the reference...
/
method
Calls socket.close() and returns a promise that fulfills when the socket has closed.
socket.close()